{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 导入一些必要的库"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from selenium.webdriver.edge.options import Options\n",
    "from selenium import webdriver\n",
    "from selenium.webdriver.support.ui import WebDriverWait\n",
    "from selenium.webdriver.support import expected_conditions as EC\n",
    "from selenium.webdriver.common.by import By\n",
    "import logging\n",
    "import pandas as pd\n",
    "import time\n",
    "import os\n",
    "from selenium.webdriver.common.action_chains import ActionChains\n",
    "from parsel import Selector\n",
    "from config import Config\n",
    "import re\n",
    "\n",
    "# 设置日志格式并且实例化对象\n",
    "logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\n",
    "logger = logging.getLogger(__name__)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 标题一"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 初始化对应的一些参数并且登录"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 初始化driver对象\n",
    "def init_driver(is_show = False):\n",
    "    \n",
    "    # 设置Edge浏览器选项\n",
    "    edge_options = Options()\n",
    "    edge_options.add_argument(\"--start-maximized\")  # 启动浏览器即最大化\n",
    "    if not is_show:\n",
    "        edge_options.add_argument(\"--headless\")  # 无头模式\n",
    "    # 实例化driver对象\n",
    "    driver = webdriver.Edge(options=edge_options)\n",
    "    # 隐式等待\n",
    "    driver.implicitly_wait(10)\n",
    "    # 绕过自动化检测\n",
    "    driver.execute_cdp_cmd(\"Page.addScriptToEvaluateOnNewDocument\", {\n",
    "        \"source\": \"\"\"\n",
    "        Object.defineProperty(navigator, 'webdriver', {\n",
    "        get: () => undefined\n",
    "        })\n",
    "        \"\"\"\n",
    "    })\n",
    "    return driver\n",
    "\n",
    "# 登录逻辑\n",
    "def login(driver):\n",
    "    # 默认启动训练任务的URL登录\n",
    "\n",
    "    # 训练任务对应的url\n",
    "    driver.get(Config.TRAIN_URL)\n",
    "    # 开始模拟登录\n",
    "    # 输入账号密码\n",
    "    UP_inputs = driver.find_elements(By.CSS_SELECTOR, '.ant-input')\n",
    "    time.sleep(0.1)\n",
    "    UP_inputs[0].send_keys(Config.USERNAME)\n",
    "    time.sleep(0.1)\n",
    "    UP_inputs[1].send_keys(Config.PASSWORD)\n",
    "    # 同意霸王条款 \n",
    "    time.sleep(0.1)\n",
    "    driver.find_element(By.CSS_SELECTOR, '.ant-checkbox-input').click()\n",
    "    # 开始登录\n",
    "    time.sleep(0.1)\n",
    "    driver.find_elements(By.CSS_SELECTOR, '.ant-row.ant-form-item-row')[-1].click()\n",
    "    time.sleep(0.5)\n",
    "    if driver.find_elements(By.XPATH, f\"//span[contains(text(),'登录成功')]\"):\n",
    "        # 等待登录完成\n",
    "        logger.info(\"登录成功\")\n",
    "        return True\n",
    "    else:\n",
    "        logger.info(\"登录失败\")\n",
    "        return False\n",
    "\n",
    "# 得到DataFrame\n",
    "def get_df(data_list):\n",
    "    # 将数据转换为DataFrame\n",
    "    df = pd.DataFrame(data_list)\n",
    "    return df\n",
    "\n",
    "\n",
    "# 将数据存储为csv数据\n",
    "def save_data(data_list, data_name):\n",
    "    \"\"\"\n",
    "    :param data_list: 数据列表,保存只保存为csv\n",
    "    :param data_name: 数据名称\n",
    "    \"\"\"\n",
    "    if type(data_list) != type(pd.DataFrame()):\n",
    "        df = get_df(data_list)\n",
    "        \n",
    "    df.to_csv(f\"data\\\\{data_name}.csv\", index=False, encoding='utf-8-sig')\n",
    "\n",
    "def read_data(data_name):\n",
    "    \"\"\"\n",
    "    :param data_name: 数据名称,只需要输入名称\n",
    "    :return: 数据列表\n",
    "    \"\"\"\n",
    "    df = pd.read_csv(f\"data\\\\{data_name}.csv\")\n",
    "    data_list = df.to_dict('records')\n",
    "    return data_list\n",
    "\n",
    "\n",
    "driver = init_driver(is_show=True) # 初始化浏览器登录\n",
    "login(driver) # 登录"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 进入模型训练任务页面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_train_tasks(driver):\n",
    "    # 获取当前页面的所有训练任务\n",
    "    # 请求训练页面的URL\n",
    "    driver.get(Config.TRAIN_URL)\n",
    "\n",
    "    # 对应的训练任务列表\n",
    "    train_task_list = []\n",
    "\n",
    "    # 获取当前页面的所有训练任务\n",
    "    while True:\n",
    "        tasks_list = driver.find_elements(By.CSS_SELECTOR, '.ant-spin-container .card___oQ1yu')\n",
    "        # 显示等待标签出现\n",
    "        WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CSS_SELECTOR, '.ant-spin-container .card___oQ1yu .runValue___SiRPp')))\n",
    "        # 开始获取训练任务信息\n",
    "        for task in tasks_list:\n",
    "            #　取出所有状态的文本\n",
    "            status = [s.text for s in task.find_elements(By.CSS_SELECTOR, '.ant-tagv5')]\n",
    "            # 运行时间\n",
    "            doing_time = task.find_element(By.CSS_SELECTOR, '.runValue___SiRPp').text\n",
    "            # 其他信息\n",
    "            info = [s.text for s in task.find_elements(By.CSS_SELECTOR, '.ant-completeText-moreText-moreText')]\n",
    "            pretrain_info = None\n",
    "            # 预训练了\n",
    "            if len(info) == 5:\n",
    "                # 任务名\n",
    "                name_info = info[0]\n",
    "                # 框架名\n",
    "                framework_info = info[1]\n",
    "                # 算法名\n",
    "                algorithm_info = info[2]\n",
    "                # 预训练模型\n",
    "                pretrain_info = info[3]\n",
    "                # 提交者\n",
    "                submitter_info = info[4]\n",
    "            else:\n",
    "                # 任务名\n",
    "                name_info = info[0]\n",
    "                # 框架名\n",
    "                framework_info = info[1]\n",
    "                # 算法名\n",
    "                algorithm_info = info[2]\n",
    "                # 提交者\n",
    "                submitter_info = info[3]\n",
    "            \n",
    "            # 描述信息\n",
    "            desc = task.find_element(By.CSS_SELECTOR, '.ant-typography.ant-typography-ellipsis.ant-typography-single-line.ant-copyableText').text\n",
    "            train_task_list.append({\n",
    "                'status': status,\n",
    "                'time': doing_time,\n",
    "                'name_info': name_info,\n",
    "                'framework_info': framework_info,\n",
    "                'algorithm_info': algorithm_info,\n",
    "                'pretrain_info': pretrain_info,\n",
    "                'submitter_info': submitter_info,\n",
    "                'desc': desc\n",
    "            })\n",
    "\n",
    "        # 检测是否可以继续下一页\n",
    "        next_page_tag = driver.find_element(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "        if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "            next_page_tag.click()\n",
    "            time.sleep(1)\n",
    "        else:\n",
    "            break\n",
    "\n",
    "    logger.info(f'共获取到{len(train_task_list)}条训练任务信息')\n",
    "    return train_task_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 保存到csv文件\n",
    "data = save_data(get_train_tasks(driver), 'train_task_info')\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 管理模型的提交 -- 需要完成上面的代码块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_monitor_url(driver):\n",
    "    # 请求对应页面    \n",
    "    driver.get(Config.TRAIN_URL)\n",
    "    time.sleep(1)\n",
    "    # 初始化列表\n",
    "    monitor_url = ''\n",
    "    # 获取正在进行的任务\n",
    "    doing_task = driver.find_elements(By.CSS_SELECTOR, '.ant-spin-container .card___oQ1yu')[0]\n",
    "    # 对应的按钮\n",
    "    doing_botton = doing_task.find_elements(By.CSS_SELECTOR, '.ant-btn.ant-btn-default')\n",
    "    # 获取监控URL\n",
    "    doing_botton[0].click()\n",
    "    # 切换到对应的窗口\n",
    "    driver.switch_to.window(driver.window_handles[-1])\n",
    "    # 获取监控URL\n",
    "    logger.info(f\"监控URL: {driver.current_url}\")\n",
    "    monitor_url = driver.current_url\n",
    "    # 切换回去\n",
    "    driver.switch_to.window(driver.window_handles[0])\n",
    "    return monitor_url\n",
    "\n",
    "# 获取对应的模型标签\n",
    "def get_model_list(driver, id=1):\n",
    "    \"\"\"\n",
    "    获取模型列表\n",
    "    :param driver: 浏览器驱动\n",
    "    :param id: 第几个任务，从第一页从上往下一直数，默认第一个\n",
    "    :return: 模型列表\n",
    "    \"\"\"\n",
    "    # 请求对应页面    \n",
    "    driver.get(Config.TRAIN_URL)\n",
    "    time.sleep(1)\n",
    "    # 存储模型信息\n",
    "    model_dict_list = []\n",
    "    # 获取正在进行的任务\n",
    "    doing_task = driver.find_elements(By.CSS_SELECTOR, '.ant-spin-container .card___oQ1yu')[id-1]\n",
    "    # 对应的按钮\n",
    "    doing_botton = doing_task.find_elements(By.CSS_SELECTOR, '.ant-btn.ant-btn-default')\n",
    "    # 进行点击\n",
    "    doing_botton[1].click()\n",
    "    \n",
    "    # 停顿\n",
    "    time.sleep(0.5)\n",
    "    while True:\n",
    "        # 获取所有模型的标签\n",
    "        model_tags = driver.find_elements(By.CSS_SELECTOR, '.ant-table-tbody>tr')\n",
    "        for i in range(1, len(model_tags)):\n",
    "            model_dict = {}\n",
    "            info_tag = model_tags[i].find_elements(By.CSS_SELECTOR, '.ant-table-cell')\n",
    "            train_time = info_tag[0]\n",
    "            train_steps = info_tag[1]\n",
    "            model_size = info_tag[2]\n",
    "            bottom_tag = info_tag[3]\n",
    "            model_dict['train_time'] = train_time.text\n",
    "            model_dict['train_steps'] = train_steps.text\n",
    "            model_dict['model_size'] = model_size.text\n",
    "            model_dict['dnowload_tag'] = bottom_tag.find_elements(By.CSS_SELECTOR, '.ant-space-item')[0]\n",
    "            model_dict['submit_tag'] = bottom_tag.find_elements(By.CSS_SELECTOR, '.ant-space-item')[1]\n",
    "            model_dict_list.append(model_dict)   \n",
    "        next_page_tag = driver.find_elements(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "        # 没有下一页\n",
    "        if len(next_page_tag) == 1:\n",
    "            break\n",
    "        # 有下一页\n",
    "        else:\n",
    "            next_page_tag = next_page_tag[-1]\n",
    "\n",
    "            # 看看是否可以点击     \n",
    "            if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "                next_page_tag.click()\n",
    "                time.sleep(1)\n",
    "            else:\n",
    "                break\n",
    "\n",
    "    logger.info(f'共获取到{len(model_dict_list)}条训练产出模型信息') \n",
    "\n",
    "    return model_dict_list\n",
    "\n",
    "def submit_model(driver, i, id, model_name, model_desc = \"\", next_page = False, next_page_cnt = 0):\n",
    "    # 查看是否有uploaded_model.csv,如果没有就创建\n",
    "    if not os.path.exists('data\\\\uploaded_model.csv'):\n",
    "        with open('data\\\\uploaded_model.csv', 'w', newline='') as f:\n",
    "            pass\n",
    "    # 如果此时csv里面文件为空，则不读取\n",
    "    if os.path.isfile('data\\\\uploaded_model.csv') and os.path.getsize('data\\\\uploaded_model.csv') > 0:\n",
    "        uploaded_model_list = read_data('uploaded_model')\n",
    "    else:\n",
    "        uploaded_model_list = []\n",
    "\n",
    "    # 转为DataFrame\n",
    "    df_uploaded_model = pd.DataFrame(uploaded_model_list)\n",
    "\n",
    "    # 请求对应页面    \n",
    "    driver.get(Config.TRAIN_URL)\n",
    "    # 获取正在进行的任务\n",
    "    doing_task = driver.find_elements(By.CSS_SELECTOR, '.ant-spin-container .card___oQ1yu')[0]\n",
    "    # 获取对应的训练任务名称\n",
    "    doing_task_name = doing_task.find_elements(By.CSS_SELECTOR, '.ant-completeText-moreText-moreText')[0].text\n",
    "    # 对应的按钮\n",
    "    doing_botton = doing_task.find_elements(By.CSS_SELECTOR, '.ant-btn.ant-btn-default')\n",
    "    # 点击按钮\n",
    "    doing_botton[1].click()\n",
    "    time.sleep(1)\n",
    "\n",
    "    for j in range(next_page_cnt):\n",
    "        if next_page:\n",
    "            next_page_tag = driver.find_elements(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "            # 没有下一页\n",
    "            if len(next_page_tag) == 1:\n",
    "                logger.info('没有下一页')\n",
    "                return False\n",
    "            # 有下一页\n",
    "            else:\n",
    "                next_page_tag = next_page_tag[-1]\n",
    "                # 看看是否可以点击     \n",
    "                if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "                    next_page_tag.click()\n",
    "                    time.sleep(1)\n",
    "\n",
    "    \n",
    "    # 获取所有模型的标签\n",
    "    model_tags = driver.find_elements(By.CSS_SELECTOR, '.ant-table-tbody>tr')[1:]\n",
    "\n",
    "    #　初始化提交的模型字典\n",
    "    uploaded_model_dict = {}\n",
    "\n",
    "    # 获取指定id的模型并且提取特征码\n",
    "    model_id_info = model_tags[i % 10].find_elements(By.CSS_SELECTOR, '.ant-table-cell')\n",
    "    # 模型特征码\n",
    "    model_speical_id = str(doing_task_name) + \"-\" + str(model_id_info[0].text) + \"-\" + str(model_id_info[1].text)\n",
    "    # 提交模型\n",
    "    model_id_info[3].find_elements(By.CSS_SELECTOR, '.ant-space-item')[1].click()\n",
    "    # 用户自定义模型名称\n",
    "    driver.find_element(By.CSS_SELECTOR, '#name').send_keys(model_name+str(id))\n",
    "    # 提交信息\n",
    "    driver.find_element(By.CSS_SELECTOR, '#desc').send_keys(model_desc)\n",
    "    if os.path.getsize('data\\\\uploaded_model.csv') > 0:\n",
    "        if model_speical_id in df_uploaded_model['model_speical_id'].values:\n",
    "            logger.info(\"模型已存在\")\n",
    "            return False\n",
    "\n",
    "    # 给模型字典赋值\n",
    "    uploaded_model_dict['model_name'] = model_name+str(id)\n",
    "    uploaded_model_dict['model_speical_id'] = model_speical_id\n",
    "    uploaded_model_dict['model_desc'] = model_desc\n",
    "    print(uploaded_model_dict)\n",
    "    # 提交\n",
    "    driver.find_element(By.CSS_SELECTOR, '.ant-btn.ant-btn-primary.ant-btn-lg.ant-btn-two-chinese-chars').click()\n",
    "    # 等待提交成功\n",
    "    success_flag = False\n",
    "    time.sleep(2)\n",
    "    if \"留在\" in driver.find_elements(By.CSS_SELECTOR, '.ant-btn.ant-btn-link')[-1].text:\n",
    "        success_flag = True\n",
    "    # 如果成功，则保存模型信息\n",
    "    if success_flag:\n",
    "        uploaded_model_list.append(uploaded_model_dict)\n",
    "        save_data(uploaded_model_list, \"uploaded_model\")\n",
    "        logger.info(f\"模型 {model_name}{id} 提交成功\")\n",
    "        return True\n",
    "    else:\n",
    "        logger.info(f\"模型 {model_name}{id} 提交失败\")\n",
    "        return True\n",
    "\n",
    "\n",
    "\n",
    "def print_model_info(model_dict_list):\n",
    "    # 使用pandas进行打印\n",
    "    df = get_df(model_dict_list)\n",
    "    print(\"模型信息:\")\n",
    "    print(df[['train_time', 'train_steps', 'model_size']])\n",
    "\n",
    "\n",
    "def auto_submit_model(driver, name, train_task_file = \"train_task_info\"):\n",
    "\n",
    "    doing_flag = False\n",
    "    train_task_list = read_data(data_name = train_task_file)\n",
    "\n",
    "    # 查看是否有uploaded_model.csv,如果没有就创建\n",
    "    if not os.path.exists('data\\\\uploaded_model.csv'):\n",
    "        with open('data\\\\uploaded_model.csv', 'w' , newline='') as f:\n",
    "            pass\n",
    "    # 如果此时csv里面文件为空，则不读取\n",
    "    if os.path.isfile('data\\\\uploaded_model.csv') and os.path.getsize('data\\\\uploaded_model.csv') > 0:\n",
    "        uploaded_model_list = read_data('uploaded_model')\n",
    "    else:\n",
    "        uploaded_model_list = []\n",
    "    id = 0\n",
    "    if uploaded_model_list:\n",
    "        # 查看最后一个任务的名称\n",
    "        last_name = pd.DataFrame(uploaded_model_list)['model_name'].values[-1]\n",
    "        # 获取名字和id\n",
    "        name_str = last_name[0]\n",
    "        id = int(re.findall(r'\\d+', last_name)[0]) + 1\n",
    "    # 查看是否有正在进行中的任务\n",
    "    for train_task in train_task_list:\n",
    "        if \"进行中\" in train_task['status']:\n",
    "            logger.info(f\"训练任务 {train_task['name_info']}[{train_task['status'][1].replace('#', '')}] 正在进行中\")\n",
    "            doing_flag = True\n",
    "\n",
    "    if doing_flag:\n",
    "        # get_monitor_url(driver)\n",
    "        model_tags_list = get_model_list(driver)\n",
    "\n",
    "        # 将数据保存为csv\n",
    "        save_data(model_tags_list, data_name=\"doing_train_model\")\n",
    "        # 打印所有模型信息\n",
    "        print_model_info(model_tags_list)\n",
    "\n",
    "        is_next = False\n",
    "         \n",
    "        for i in range(len(model_tags_list)):\n",
    "            if i >= 10:\n",
    "                is_next = True\n",
    "            submit_flag = submit_model(driver, i, id, name, next_page=is_next, next_page_cnt= int(i / 10))\n",
    "            if submit_flag:\n",
    "                id += 1\n",
    "            else:\n",
    "                return True\n",
    "        return True\n",
    "\n",
    "    else:\n",
    "        logger.info(\"没有正在进行中的训练任务\")\n",
    "        return False\n",
    "\n",
    "auto_submit_model(driver, name='kaiwu')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 进入模型管理任务页面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_upload_model(driver):\n",
    "   # 请求模型管理页面的URL\n",
    "    driver.get(Config.MODLE_URL)\n",
    "    # 上传模型列表\n",
    "    upload_model_list = []\n",
    "    # 显示等待\n",
    "    time.sleep(1)\n",
    "\n",
    "    while True:\n",
    "        # 获取模型列表\n",
    "        model_tag_list = driver.find_elements(By.CSS_SELECTOR, '.ant-table-tbody>tr')\n",
    "        model_tag_list = [model_tag_list[i] for i in range(1, len(model_tag_list))]\n",
    "        # 遍历模型列表\n",
    "        for model_tag in model_tag_list:\n",
    "            # 存储模型信息的字典\n",
    "            model_info_dict = {}\n",
    "            # 获取模型名称\n",
    "            model_name = model_tag.find_elements(By.CSS_SELECTOR, '.ant-table-cell.ant-table-cell-fix-left.ant-table-cell-fix-left-last>div>div')[0].text\n",
    "            model_info_list = model_tag.find_elements(By.CSS_SELECTOR, '.ant-table-cell')\n",
    "            model_info_list = [model_info_list[i].text for i in range(1, len(model_info_list))]\n",
    "            # 模型状态\n",
    "            model_status = model_tag.find_elements(By.CSS_SELECTOR, '.ant-tagv5')[0].text\n",
    "            # 模型ID\n",
    "            model_ID = model_tag.get_attribute(\"data-row-key\")\n",
    "            # 模型大小\n",
    "            model_size = model_info_list[0]\n",
    "            # 模型框架\n",
    "            model_framework = model_info_list[1]\n",
    "            # 模型算法\n",
    "            model_algorithm = model_info_list[2]\n",
    "            # 模型步数\n",
    "            model_steps = model_info_list[3]\n",
    "            # 模型训练时间\n",
    "            model_train_time = model_info_list[4]\n",
    "            # 模型归属\n",
    "            model_owner = model_info_list[5]\n",
    "            # 模型版本\n",
    "            model_version = model_info_list[6]\n",
    "            # 模型提交者\n",
    "            model_submitter = model_info_list[7]\n",
    "            # 模型创建时间\n",
    "            model_create_time = model_info_list[8]\n",
    "\n",
    "            # 将模型信息存储到字典中\n",
    "            model_info_dict['model_name'] = model_name\n",
    "            model_info_dict['model_status'] = model_status\n",
    "            model_info_dict['model_ID'] = model_ID\n",
    "            model_info_dict['model_size'] = model_size\n",
    "            model_info_dict['model_framework'] = model_framework\n",
    "            model_info_dict['model_algorithm'] = model_algorithm\n",
    "            model_info_dict['model_steps'] = model_steps\n",
    "            model_info_dict['model_train_time'] = model_train_time\n",
    "            model_info_dict['model_owner'] = model_owner\n",
    "            model_info_dict['model_version'] = model_version\n",
    "            model_info_dict['model_submitter'] = model_submitter\n",
    "            model_info_dict['model_create_time'] = model_create_time\n",
    "\n",
    "            upload_model_list.append(model_info_dict)\n",
    "\n",
    "        # 检测是否可以继续下一页\n",
    "        next_page_tag = driver.find_element(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "        if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "            next_page_tag.click()\n",
    "            time.sleep(1)\n",
    "        else:\n",
    "            break\n",
    "\n",
    "    logger.info(f'共获取到{len(upload_model_list)}条上传模型信息') \n",
    "\n",
    "    return upload_model_list\n",
    "\n",
    "upload_model_info = get_upload_model(driver)\n",
    "# 保存\n",
    "save_data(upload_model_info, 'upload_model_info')\n",
    "get_df(upload_model_info)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 模型评估自定义\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def start_eval(driver, model_tag, model_name):\n",
    "\n",
    "    # 查看是否有uploaded_model.csv,如果没有就创建\n",
    "    if not os.path.exists('data\\\\evaled_model.csv'):\n",
    "        with open('data\\\\evaled_model.csv', 'w', newline='') as f:\n",
    "            pass\n",
    "    # 如果此时csv里面文件为空，则不读取\n",
    "    if os.path.isfile('data\\\\evaled_model.csv') and os.path.getsize('data\\\\evaled_model.csv') > 0:\n",
    "        evaled_model_list = read_data('evaled_model')\n",
    "    else:\n",
    "        evaled_model_list = [] \n",
    "    \n",
    "    # 点击评估的按钮\n",
    "    model_tag.find_elements(By.CSS_SELECTOR, \".ant-btn.ant-btn-link\")[0].click()\n",
    "\n",
    "    error_tag = driver.find_elements(By.XPATH, f\"//span[contains(text(),'同时可运行局数不足')]\")\n",
    "    if error_tag:\n",
    "        logger.error('可用并发局数不足')\n",
    "        return 'YES'\n",
    "    \n",
    "    # 输入任务名称\n",
    "    driver.find_element(By.CSS_SELECTOR, '#name').send_keys(model_name + \"/\" + Config.BEST_MODEL)\n",
    "    # 选择我方阵营\n",
    "    driver.find_elements(By.CSS_SELECTOR, '.ant-select.ant-select-in-form-item.ant-select-multiple.ant-select-allow-clear.ant-select-show-arrow')[0].click()\n",
    "    time.sleep(1)\n",
    "    # 选择英雄\n",
    "    heros_tag = driver.find_elements(By.CSS_SELECTOR, '.ant-select-item.ant-select-item-option')\n",
    "    for hero_tag in heros_tag:\n",
    "        hero_tag.click()\n",
    "    # 选择完毕\n",
    "    driver.find_elements(By.CSS_SELECTOR, '.ant-select.ant-select-in-form-item.ant-select-multiple.ant-select-allow-clear.ant-select-show-arrow')[0].click()\n",
    "    # 选择敌方阵营的英雄\n",
    "    driver.find_element(By.CSS_SELECTOR, '#rc_select_18').click()\n",
    "    time.sleep(1)\n",
    "    # 输入要搜索的模型\n",
    "    select_model_tag = driver.find_element(By.CSS_SELECTOR, '.ant-input-affix-wrapper.ant-input-search.ant-input-affix-wrapper-borderless')\n",
    "    # 引用鼠标动作\n",
    "    ActionChains(driver).click(select_model_tag).send_keys_to_element(select_model_tag, Config.BEST_MODEL).perform()\n",
    "    # 根据文本选择\n",
    "    driver.find_element(By.XPATH, f\"//span[contains(text(),'文件大小')]\").click()\n",
    "    # 选择敌方阵营\n",
    "    driver.find_elements(By.CSS_SELECTOR, '.ant-select.ant-select-in-form-item.ant-select-multiple.ant-select-allow-clear.ant-select-show-arrow')[1].click()\n",
    "    time.sleep(1)\n",
    "    # 选择英雄\n",
    "    heros_tag = driver.find_elements(By.CSS_SELECTOR, '.ant-select-item.ant-select-item-option')[-3:]\n",
    "    for hero_tag in heros_tag:\n",
    "        hero_tag.click()\n",
    "    # 选择完毕\n",
    "    driver.find_elements(By.CSS_SELECTOR, '.ant-select.ant-select-in-form-item.ant-select-multiple.ant-select-allow-clear.ant-select-show-arrow')[1].click()\n",
    "    # 输入评估局数\n",
    "    for i in range(Config.EVALUATE_NUM):\n",
    "        time.sleep(0.2)\n",
    "        driver.find_elements(By.CSS_SELECTOR, '.anticon.ant-input-number-camp-icon')[0].click()\n",
    "    # 开始评估\n",
    "    driver.find_element(By.CSS_SELECTOR, '.ant-btn.ant-btn-primary.ant-btn-lg').click()\n",
    "    time.sleep(2)\n",
    "\n",
    "    \n",
    "    success_flag = False\n",
    "    if \"留在\" in driver.find_elements(By.CSS_SELECTOR, '.ant-btn.ant-btn-link')[-1].text:\n",
    "        success_flag = True\n",
    "\n",
    "    if success_flag:\n",
    "        logger.info(f\"{model_name}评估成功\")\n",
    "        evaled_model_dict = {}\n",
    "        evaled_model_dict['model_name'] = model_name\n",
    "        evaled_model_list.append(evaled_model_dict)\n",
    "        save_data(evaled_model_list, \"evaled_model\")\n",
    "        return True\n",
    "    else:\n",
    "        logger.info(f\"{model_name}评估失败\")\n",
    "        return False\n",
    "\n",
    "\n",
    "\n",
    "def eval_model(driver, eval_model_list):\n",
    "    driver.get(Config.MODLE_URL)\n",
    "    time.sleep(1)\n",
    "\n",
    "    # 是否翻页\n",
    "    is_next_page = False\n",
    "    i = 0\n",
    "    # 第一步先遍历\n",
    "    while True:\n",
    "        if i == len(eval_model_list):\n",
    "            break\n",
    "\n",
    "        # 如果需要翻页\n",
    "        if is_next_page:\n",
    "            # 检测是否可以继续下一页\n",
    "            next_page_tag = driver.find_element(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "            if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "                next_page_tag.click()\n",
    "                time.sleep(1)\n",
    "\n",
    "        # 寻找对应的标签\n",
    "        upload_model_tags = driver.find_elements(By.CSS_SELECTOR, '.ant-table-tbody>tr')[1:]\n",
    "\n",
    "        for j in range(len(upload_model_tags)):\n",
    "            # 获取模型名称\n",
    "            model_name = upload_model_tags[j].find_elements(By.CSS_SELECTOR, '.ant-table-cell.ant-table-cell-fix-left.ant-table-cell-fix-left-last>div>div')[0].text\n",
    "            # 可以开始评估                  \n",
    "            if model_name == eval_model_list[i]:\n",
    "                succ_flag = start_eval(driver, upload_model_tags[j], model_name)\n",
    "                if succ_flag == 'YES':\n",
    "                    return True\n",
    "                # 评估完成\n",
    "                is_next_page = False\n",
    "                i += 1\n",
    "                # 重新请求\n",
    "                driver.get(Config.MODLE_URL)\n",
    "                time.sleep(1)\n",
    "                # 结束\n",
    "                break\n",
    "            else:\n",
    "                if j == len(upload_model_tags) - 1:\n",
    "                    # 翻页\n",
    "                    is_next_page = True\n",
    "                continue\n",
    "\n",
    "# 自动评估\n",
    "def auto_eval(driver):\n",
    "    # 查看是否有uploaded_model.csv,如果没有就创建\n",
    "    if not os.path.exists('data\\\\evaled_model.csv'):\n",
    "        with open('data\\\\evaled_model.csv', 'w', newline='') as f:\n",
    "            pass\n",
    "    # 如果此时csv里面文件为空，则不读取\n",
    "    if os.path.isfile('data\\\\evaled_model.csv') and os.path.getsize('data\\\\evaled_model.csv') > 0:\n",
    "        evaled_model_list = read_data('evaled_model')\n",
    "    else:\n",
    "        evaled_model_list = {\"model_name\": []} \n",
    "\n",
    "\n",
    "    # 进入评估管理页面\n",
    "    driver.get(Config.MODLE_URL)\n",
    "    # 读取两个csv文件来确定上传的有那些检测成功\n",
    "    upload_model_info = read_data(\"upload_model_info\")\n",
    "    uploaded_model = get_df(read_data(\"uploaded_model\"))\n",
    "    # 将上传的检测成功的模型放入列表\n",
    "    success_uploaded_list = []\n",
    "    for upload_model in upload_model_info:\n",
    "        model_name = upload_model['model_name']\n",
    "        model_status = upload_model['model_status']\n",
    "        if model_name in uploaded_model['model_name'].values and model_status == \"检测成功\" and model_name not in pd.DataFrame(evaled_model_list)['model_name'].values:\n",
    "            success_uploaded_list.append(model_name)\n",
    "    # 开始进行评估对应检测完成的模型\n",
    "    succ_flag = eval_model(driver, success_uploaded_list)\n",
    "    if succ_flag:\n",
    "        logging.info(f\"评估任务完成\")\n",
    "        return True\n",
    "\n",
    "auto_eval(driver)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import time\n",
    "import logging\n",
    "from datetime import datetime\n",
    "import traceback\n",
    "\n",
    "# 配置日志\n",
    "logging.basicConfig(\n",
    "    level=logging.INFO,\n",
    "    format='%(asctime)s - %(levelname)s - %(message)s',\n",
    "    handlers=[\n",
    "        logging.FileHandler('task_log.log'),\n",
    "        logging.StreamHandler()\n",
    "    ]\n",
    ")\n",
    "\n",
    "def your_task():\n",
    "    \"\"\"\n",
    "    在这里实现你的具体任务\n",
    "    \"\"\"\n",
    "    # upload_model_info = get_upload_model(driver)\n",
    "    # # 保存\n",
    "    # save_data(upload_model_info, 'upload_model_info')\n",
    "    # get_df(upload_model_info)\n",
    "    # 示例任务\n",
    "    logging.info(\"执行任务...\")\n",
    "    # auto_submit_model(driver, name='kaiwu')\n",
    "    get_eval_info(driver)\n",
    "    # auto_eval(driver)\n",
    "    # 这里添加你的具体任务代码\n",
    "\n",
    "def run_with_retry():\n",
    "    while True:\n",
    "        try:\n",
    "            # 记录开始时间\n",
    "            start_time = datetime.now()\n",
    "            logging.info(f\"开始执行任务: {start_time}\")\n",
    "            \n",
    "            # 执行任务\n",
    "            your_task()\n",
    "            \n",
    "            # 记录成功信息\n",
    "            logging.info(\"任务执行成功\")\n",
    "            \n",
    "        except Exception as e:\n",
    "            # 记录错误信息\n",
    "            logging.error(f\"任务执行出错: {str(e)}\")\n",
    "            logging.error(f\"错误详情:\\n{traceback.format_exc()}\")\n",
    "            logging.info(\"将在1小时后重试\")\n",
    "        \n",
    "        # 等待1小时\n",
    "        time.sleep(3600)  # 3600秒 = 1小时\n",
    "\n",
    "if __name__ == \"__main__\":\n",
    "    logging.info(\"启动定时任务程序\")\n",
    "    run_with_retry()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 进入评估管理页面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def shadown_root_html(driver):\n",
    "    # 执行JavaScript代码获取Shadow DOM中的HTML内容\n",
    "    js_code = \"\"\"\n",
    "        // 查询包含 shadow DOM 的元素\n",
    "        const wujieApp = document.querySelector(\"#root > div > div:nth-child(2) > wujie-app\");\n",
    "        \n",
    "        // 检查该元素是否存在并且是否有 shadowRoot\n",
    "        if (wujieApp && wujieApp.shadowRoot) {\n",
    "            // 在 shadowRoot 中查询 html 标签\n",
    "            const htmlElement = wujieApp.shadowRoot.querySelector(\"html\");\n",
    "            \n",
    "            // 检查 html 标签是否存在，并返回其 outerHTML\n",
    "            if (htmlElement) {\n",
    "                return htmlElement.outerHTML;\n",
    "            }\n",
    "        }\n",
    "        \n",
    "        // 如果没有找到 shadowRoot 或 html 标签，则返回 null\n",
    "        return null;\n",
    "    \"\"\"\n",
    "    shadow_dom_html = driver.execute_script(js_code)\n",
    "    with open(\"shadow_dom.html\", \"w\", encoding=\"utf-8\") as f:   \n",
    "        f.write(shadow_dom_html)\n",
    "    return shadow_dom_html\n",
    "\n",
    "def get_eval_info(driver):\n",
    "    # 获取评估信息\n",
    "    driver.get(Config.EVAL_URL)\n",
    "\n",
    "    # 读取前面两个对应的csv文件\n",
    "    upload_model_info = read_data(\"upload_model_info\")\n",
    "    uploaded_model = read_data(\"uploaded_model\")\n",
    "    evaled_model = read_data(\"evaled_model\")\n",
    "\n",
    "    # 先初始化评估信息的空列表\n",
    "    eval_info_list = []\n",
    "\n",
    "    #　检测下是否存在eval_info.csv文件，如果存在则先读取\n",
    "    if os.path.exists(\"data\\\\eval_info.csv\") and os.path.getsize(\"data\\\\eval_info.csv\") > 0:\n",
    "        eval_info_list = read_data(\"eval_info\")\n",
    "    else:\n",
    "        # 如果不存在，则先创建一个空的csv文件\n",
    "        with open(\"data\\\\eval_info.csv\", \"w\", encoding=\"utf-8\") as f:\n",
    "            pass\n",
    "        eval_info_list = []\n",
    "\n",
    "    while True:\n",
    "        # 取到所有评估任务的标签\n",
    "        evaled_tags = driver.find_elements(By.CSS_SELECTOR, \".battleTaskItem___fe3Fb\")\n",
    "\n",
    "        for eval_tag in evaled_tags:\n",
    "\n",
    "            # 获取评估任务的名称\n",
    "            eval_name = eval_tag.find_element(By.CSS_SELECTOR, \".modelName___FZQCn\").text\n",
    "            # 对应的评估信息tag列表\n",
    "            eval_info_tags = eval_tag.find_elements(By.CSS_SELECTOR, \".ant-tagv5\")\n",
    "            # 评估状态\n",
    "            eval_status = eval_info_tags[0].text\n",
    "            if eval_status != \"已完成\":\n",
    "                continue\n",
    "            # 评估id\n",
    "            eval_id = eval_info_tags[1].text\n",
    "\n",
    "            if eval_info_list:\n",
    "                # 判断是否已经存在该评估信息\n",
    "                if eval_id in get_df(eval_info_list)['eval_id'].values:\n",
    "                    continue\n",
    "\n",
    "            # 评估可见性\n",
    "            eval_visibility = eval_info_tags[2].text\n",
    "            # 评估版本\n",
    "            eval_version = eval_info_tags[3].text\n",
    "            # 评估提交人\n",
    "            eval_submitter = eval_tag.find_element(By.CSS_SELECTOR, \".ant-typography.ant-typography-ellipsis.ant-typography-single-line.ant-copyableText\").text\n",
    "            # 评估A阵营模型\n",
    "            eval_A_model = eval_tag.find_elements(By.CSS_SELECTOR, \".ant-typography.ant-typography-ellipsis.ant-typography-single-line.ant-typography-ellipsis-single-line.modelName___RuHVB\")[0].text\n",
    "            # 评估B阵营模型\n",
    "            eval_B_model = eval_tag.find_elements(By.CSS_SELECTOR, \".ant-typography.ant-typography-ellipsis.ant-typography-single-line.ant-typography-ellipsis-single-line.modelName___RuHVB\")[1].text\n",
    "            # A胜利次数\n",
    "            eval_A_win_count = eval_tag.find_elements(By.CSS_SELECTOR, \".value___F7456.ellipsis___ToyLS.scoreTx___uNW7T\")[0].text\n",
    "            # B胜利次数\n",
    "            eval_B_win_count = eval_tag.find_elements(By.CSS_SELECTOR, \".value___F7456.ellipsis___ToyLS.scoreTx___uNW7T\")[1].text\n",
    "            # 异常次数\n",
    "            eval_exception_count = eval_tag.find_elements(By.CSS_SELECTOR, \".value___F7456.ellipsis___ToyLS.scoreTx___uNW7T\")[2].text\n",
    "            # 总次数\n",
    "            eval_total_count = eval_tag.find_elements(By.CSS_SELECTOR, \".value___F7456.ellipsis___ToyLS.scoreTx___uNW7T\")[3].text\n",
    "            # 查看详细页面\n",
    "            eval_detail_page = eval_tag.find_element(By.CSS_SELECTOR, \".ant-btn.ant-btn-default\").click()\n",
    "            # 切换到新窗口\n",
    "            driver.switch_to.window(driver.window_handles[-1])\n",
    "            # 等待5秒\n",
    "            time.sleep(5)\n",
    "            # 获取隐藏的html\n",
    "            shadown_html = shadown_root_html(driver)\n",
    "            # 用selector获取信息\n",
    "            selector = Selector(shadown_html)\n",
    "            # 获取对应的信息\n",
    "            divs = selector.css(\".ant-table-tbody\")[0]\n",
    "            divs = divs.css(\"tr\")[1:]\n",
    "            # A阵营所有信息\n",
    "            A_detail_info = divs[0].css(\".ant-table-cell>div::text\").getall()\n",
    "            # B阵营所有信息\n",
    "            B_detail_info = divs[1].css(\".ant-table-cell>div::text\").getall()\n",
    "            # A阵营avg KDA\n",
    "            eval_A_kda = A_detail_info[1]\n",
    "            # A阵营avg 击杀\n",
    "            eval_A_kill = A_detail_info[2]\n",
    "            # A阵营avg 死亡\n",
    "            eval_A_death = A_detail_info[3]\n",
    "            # A阵营avg 经济\n",
    "            eval_A_money = A_detail_info[4]\n",
    "            # A阵营avg 经验\n",
    "            eval_A_exp = A_detail_info[5]\n",
    "            # B阵营 avg KDA\n",
    "            eval_B_kda = B_detail_info[1]\n",
    "            # B阵营avg 击杀\n",
    "            eval_B_kill = B_detail_info[2]\n",
    "            # B阵营avg 死亡\n",
    "            eval_B_death = B_detail_info[3]\n",
    "            # B阵营avg 经济\n",
    "            eval_B_money = B_detail_info[4]\n",
    "            # B阵营avg 经验\n",
    "            eval_B_exp = B_detail_info[5]\n",
    "            # 退回\n",
    "            driver.close()\n",
    "            # 换回原窗口\n",
    "            driver.switch_to.window(driver.window_handles[0])\n",
    "\n",
    "            # 存进字典\n",
    "            eval_data = {\n",
    "                \"eval_name\": eval_name,\n",
    "                \"eval_status\" : eval_status,\n",
    "                \"eval_id\": eval_id,\n",
    "                \"eval_visibility\": eval_visibility,\n",
    "                \"eval_version\": eval_version,\n",
    "                \"eval_submitter\": eval_submitter,\n",
    "                \"eval_A_model\": eval_A_model,\n",
    "                \"eval_B_model\": eval_B_model,\n",
    "                \"eval_A_win_count\": eval_A_win_count,\n",
    "                \"eval_B_win_count\": eval_B_win_count,\n",
    "                \"eval_exception_count\": eval_exception_count,\n",
    "                \"eval_total_count\": eval_total_count,\n",
    "                \"eval_A_kda\": eval_A_kda,\n",
    "                \"eval_A_kill\": eval_A_kill,\n",
    "                \"eval_A_death\": eval_A_death,\n",
    "                \"eval_A_money\": eval_A_money,\n",
    "                \"eval_A_exp\": eval_A_exp,\n",
    "                \"eval_B_kda\": eval_B_kda,\n",
    "                \"eval_B_kill\": eval_B_kill,\n",
    "                \"eval_B_death\": eval_B_death,\n",
    "                \"eval_B_money\": eval_B_money,\n",
    "                \"eval_B_exp\": eval_B_exp\n",
    "\n",
    "            }\n",
    "            eval_info_list.append(eval_data)\n",
    "\n",
    "        # 检测是否可以继续下一页\n",
    "        next_page_tag = driver.find_element(By.CSS_SELECTOR, '.ant-pagination-next')\n",
    "        if next_page_tag.get_attribute('aria-disabled') == 'false':\n",
    "            next_page_tag.click()\n",
    "            time.sleep(1)\n",
    "        else: \n",
    "            # 保存到文件\n",
    "            save_data(eval_info_list, 'eval_info')\n",
    "            break\n",
    "\n",
    "get_eval_info(driver)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_output_info(eval_df, upload_df, uploaded_df, enemy_model):\n",
    "    # 获取胜率信息\n",
    "    eval_df[\"win_rate\"] = eval_df['eval_A_win_count'] / (eval_df['eval_A_win_count'] + eval_df['eval_B_win_count'])\n",
    "    # 处理所有信息\n",
    "    upload_model_info = upload_df[['model_name', 'model_steps']]\n",
    "    output_info = pd.merge(upload_model_info, eval_df, left_on='model_name', right_on='eval_A_model')\n",
    "    # 对应对手\n",
    "    output_info = output_info[output_info['eval_B_model'] == enemy_model]\n",
    "    # modelname必须是upload_df中的而且也在\n",
    "    output_info = output_info[output_info['model_name'].isin(uploaded_df.model_name)]\n",
    "\n",
    "    return output_info[['win_rate', 'eval_A_kda', 'eval_A_money', 'eval_A_exp', 'model_steps', 'model_name']]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"03b171ad28de40f08081d82237e08b44\" style=\"width:1200px; height:800px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_03b171ad28de40f08081d82237e08b44 = echarts.init(\n",
       "                    document.getElementById('03b171ad28de40f08081d82237e08b44'), 'dark', {renderer: 'canvas'});\n",
       "                var option_03b171ad28de40f08081d82237e08b44 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6a21\\u578b\\u80dc\\u7387\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"kaiwu150/13156\",\n",
       "                    0.43\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu260/15761\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu263/15810\",\n",
       "                    0.53\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu262/15858\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu265/15908\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu264/15957\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu267/16006\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu266/16058\",\n",
       "                    0.42\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu269/16107\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu268/16156\",\n",
       "                    0.64\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu271/16204\",\n",
       "                    0.46\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu270/16254\",\n",
       "                    0.61\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu273/16302\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu272/16351\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu275/16399\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu274/16448\",\n",
       "                    0.66\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu277/16497\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu276/16547\",\n",
       "                    0.37\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu278/16645\",\n",
       "                    0.42\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu280/16791\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu284/16840\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu283/16889\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu287/16939\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu286/16988\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu285/17037\",\n",
       "                    0.49\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu295/17527\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu327/17527\",\n",
       "                    0.36\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu329/17570\",\n",
       "                    0.53\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu328/17619\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu332/17668\",\n",
       "                    0.31\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu331/17718\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu330/17769\",\n",
       "                    0.44\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu334/17821\",\n",
       "                    0.44\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu333/17870\",\n",
       "                    0.33\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu301/17873\",\n",
       "                    0.37\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu336/17923\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu335/17973\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu339/18024\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu338/18073\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu337/18128\",\n",
       "                    0.37\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu341/18177\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu340/18228\",\n",
       "                    0.39\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu343/18279\",\n",
       "                    0.42\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu342/18329\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu346/18377\",\n",
       "                    0.39\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu345/18426\",\n",
       "                    0.4\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu344/18475\",\n",
       "                    0.39\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu316/18507\",\n",
       "                    0.52\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu315/18555\",\n",
       "                    0.53\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu323/18847\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu322/18897\",\n",
       "                    0.61\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu326/18945\",\n",
       "                    0.6\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu325/18994\",\n",
       "                    0.5\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    },\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5c0f\\u503c\",\n",
       "                        \"type\": \"min\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u5e73\\u5747\\u503c\",\n",
       "                        \"type\": \"average\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6a21\\u578bKDA\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"kaiwu150/13156\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.68\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.57\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu260/15761\",\n",
       "                    0.75\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu263/15810\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu262/15858\",\n",
       "                    0.48\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu265/15908\",\n",
       "                    0.88\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu264/15957\",\n",
       "                    0.65\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu267/16006\",\n",
       "                    0.75\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu266/16058\",\n",
       "                    0.62\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu269/16107\",\n",
       "                    0.75\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu268/16156\",\n",
       "                    0.85\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu271/16204\",\n",
       "                    0.38\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu270/16254\",\n",
       "                    0.68\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu273/16302\",\n",
       "                    0.62\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu272/16351\",\n",
       "                    0.55\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu275/16399\",\n",
       "                    0.75\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu274/16448\",\n",
       "                    0.72\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu277/16497\",\n",
       "                    0.7\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu276/16547\",\n",
       "                    0.49\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu278/16645\",\n",
       "                    0.58\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu280/16791\",\n",
       "                    0.66\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu284/16840\",\n",
       "                    0.65\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu283/16889\",\n",
       "                    0.61\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu287/16939\",\n",
       "                    0.52\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu286/16988\",\n",
       "                    0.67\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu285/17037\",\n",
       "                    0.52\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu295/17527\",\n",
       "                    0.75\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu327/17527\",\n",
       "                    0.36\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu329/17570\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu328/17619\",\n",
       "                    0.54\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu332/17668\",\n",
       "                    0.41\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu331/17718\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu330/17769\",\n",
       "                    0.67\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu334/17821\",\n",
       "                    0.65\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu333/17870\",\n",
       "                    0.46\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu301/17873\",\n",
       "                    0.56\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu336/17923\",\n",
       "                    0.53\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu335/17973\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu339/18024\",\n",
       "                    0.6\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu338/18073\",\n",
       "                    0.72\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu337/18128\",\n",
       "                    0.77\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu341/18177\",\n",
       "                    0.64\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu340/18228\",\n",
       "                    0.5\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu343/18279\",\n",
       "                    0.4\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu342/18329\",\n",
       "                    0.69\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu346/18377\",\n",
       "                    0.47\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu345/18426\",\n",
       "                    0.3\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu344/18475\",\n",
       "                    0.72\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu316/18507\",\n",
       "                    0.68\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu315/18555\",\n",
       "                    0.49\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu323/18847\",\n",
       "                    0.59\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu322/18897\",\n",
       "                    0.61\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu326/18945\",\n",
       "                    0.57\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu325/18994\",\n",
       "                    0.56\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    },\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5c0f\\u503c\",\n",
       "                        \"type\": \"min\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u5e73\\u5747\\u503c\",\n",
       "                        \"type\": \"average\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6a21\\u578b\\u7ecf\\u6d4e\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"kaiwu150/13156\",\n",
       "                    0.5956\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.6139\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.5751\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu260/15761\",\n",
       "                    0.6024\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu263/15810\",\n",
       "                    0.5994\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu262/15858\",\n",
       "                    0.5787\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu265/15908\",\n",
       "                    0.6317\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu264/15957\",\n",
       "                    0.5663\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu267/16006\",\n",
       "                    0.5724\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu266/16058\",\n",
       "                    0.5991\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu269/16107\",\n",
       "                    0.5679\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu268/16156\",\n",
       "                    0.6414\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu271/16204\",\n",
       "                    0.5465\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu270/16254\",\n",
       "                    0.6492\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu273/16302\",\n",
       "                    0.5951\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu272/16351\",\n",
       "                    0.6364\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu275/16399\",\n",
       "                    0.5984\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu274/16448\",\n",
       "                    0.6361\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu277/16497\",\n",
       "                    0.6159\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu276/16547\",\n",
       "                    0.5802\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu278/16645\",\n",
       "                    0.5659\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu280/16791\",\n",
       "                    0.5876\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu284/16840\",\n",
       "                    0.632\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu283/16889\",\n",
       "                    0.5734\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu287/16939\",\n",
       "                    0.6521\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu286/16988\",\n",
       "                    0.565\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu285/17037\",\n",
       "                    0.578\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu295/17527\",\n",
       "                    0.5911\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu327/17527\",\n",
       "                    0.527\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu329/17570\",\n",
       "                    0.5787\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu328/17619\",\n",
       "                    0.5927\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu332/17668\",\n",
       "                    0.5306\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu331/17718\",\n",
       "                    0.5809\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu330/17769\",\n",
       "                    0.5983\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu334/17821\",\n",
       "                    0.5862\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu333/17870\",\n",
       "                    0.5599\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu301/17873\",\n",
       "                    0.6057\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu336/17923\",\n",
       "                    0.5677\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu335/17973\",\n",
       "                    0.5879\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu339/18024\",\n",
       "                    0.5923\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu338/18073\",\n",
       "                    0.6257\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu337/18128\",\n",
       "                    0.6075\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu341/18177\",\n",
       "                    0.5717\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu340/18228\",\n",
       "                    0.5401\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu343/18279\",\n",
       "                    0.5926\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu342/18329\",\n",
       "                    0.5927\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu346/18377\",\n",
       "                    0.5512\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu345/18426\",\n",
       "                    0.6099\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu344/18475\",\n",
       "                    0.6243\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu316/18507\",\n",
       "                    0.5897\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu315/18555\",\n",
       "                    0.5898\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu323/18847\",\n",
       "                    0.5974\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu322/18897\",\n",
       "                    0.5906\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu326/18945\",\n",
       "                    0.5914\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu325/18994\",\n",
       "                    0.58\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    },\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5c0f\\u503c\",\n",
       "                        \"type\": \"min\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u5e73\\u5747\\u503c\",\n",
       "                        \"type\": \"average\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6a21\\u578b\\u7ecf\\u9a8c\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"kaiwu150/13156\",\n",
       "                    0.4355\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.4441\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu261/15712\",\n",
       "                    0.4156\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu260/15761\",\n",
       "                    0.4353\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu263/15810\",\n",
       "                    0.436\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu262/15858\",\n",
       "                    0.4174\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu265/15908\",\n",
       "                    0.4584\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu264/15957\",\n",
       "                    0.4077\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu267/16006\",\n",
       "                    0.4156\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu266/16058\",\n",
       "                    0.4389\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu269/16107\",\n",
       "                    0.4123\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu268/16156\",\n",
       "                    0.472\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu271/16204\",\n",
       "                    0.3911\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu270/16254\",\n",
       "                    0.4737\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu273/16302\",\n",
       "                    0.4297\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu272/16351\",\n",
       "                    0.4672\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu275/16399\",\n",
       "                    0.4346\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu274/16448\",\n",
       "                    0.4642\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu277/16497\",\n",
       "                    0.447\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu276/16547\",\n",
       "                    0.4205\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu278/16645\",\n",
       "                    0.4113\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu280/16791\",\n",
       "                    0.4294\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu284/16840\",\n",
       "                    0.4638\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu283/16889\",\n",
       "                    0.4181\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu287/16939\",\n",
       "                    0.4781\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu286/16988\",\n",
       "                    0.4079\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu285/17037\",\n",
       "                    0.4198\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu295/17527\",\n",
       "                    0.4307\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu327/17527\",\n",
       "                    0.3756\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu329/17570\",\n",
       "                    0.4224\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu328/17619\",\n",
       "                    0.4346\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu332/17668\",\n",
       "                    0.3869\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu331/17718\",\n",
       "                    0.4227\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu330/17769\",\n",
       "                    0.436\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu334/17821\",\n",
       "                    0.4294\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu333/17870\",\n",
       "                    0.4084\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu301/17873\",\n",
       "                    0.4388\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu336/17923\",\n",
       "                    0.4109\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu335/17973\",\n",
       "                    0.4308\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu339/18024\",\n",
       "                    0.4288\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu338/18073\",\n",
       "                    0.4564\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu337/18128\",\n",
       "                    0.4411\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu341/18177\",\n",
       "                    0.4132\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu340/18228\",\n",
       "                    0.3928\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu343/18279\",\n",
       "                    0.4333\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu342/18329\",\n",
       "                    0.4327\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu346/18377\",\n",
       "                    0.3972\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu345/18426\",\n",
       "                    0.4477\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu344/18475\",\n",
       "                    0.4541\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu316/18507\",\n",
       "                    0.4257\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu315/18555\",\n",
       "                    0.4314\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu323/18847\",\n",
       "                    0.4347\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu322/18897\",\n",
       "                    0.43\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu326/18945\",\n",
       "                    0.428\n",
       "                ],\n",
       "                [\n",
       "                    \"kaiwu325/18994\",\n",
       "                    0.4259\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5927\\u503c\",\n",
       "                        \"type\": \"max\"\n",
       "                    },\n",
       "                    {\n",
       "                        \"name\": \"\\u6700\\u5c0f\\u503c\",\n",
       "                        \"type\": \"min\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8\n",
       "                },\n",
       "                \"data\": [\n",
       "                    {\n",
       "                        \"name\": \"\\u5e73\\u5747\\u503c\",\n",
       "                        \"type\": \"average\"\n",
       "                    }\n",
       "                ]\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6a21\\u578b\\u80dc\\u7387\",\n",
       "                \"\\u6a21\\u578bKDA\",\n",
       "                \"\\u6a21\\u578b\\u7ecf\\u6d4e\",\n",
       "                \"\\u6a21\\u578b\\u7ecf\\u9a8c\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"type\": \"category\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"rotate\": 0,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"boundaryGap\": false,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"kaiwu150/13156\",\n",
       "                \"kaiwu261/15712\",\n",
       "                \"kaiwu261/15712\",\n",
       "                \"kaiwu260/15761\",\n",
       "                \"kaiwu263/15810\",\n",
       "                \"kaiwu262/15858\",\n",
       "                \"kaiwu265/15908\",\n",
       "                \"kaiwu264/15957\",\n",
       "                \"kaiwu267/16006\",\n",
       "                \"kaiwu266/16058\",\n",
       "                \"kaiwu269/16107\",\n",
       "                \"kaiwu268/16156\",\n",
       "                \"kaiwu271/16204\",\n",
       "                \"kaiwu270/16254\",\n",
       "                \"kaiwu273/16302\",\n",
       "                \"kaiwu272/16351\",\n",
       "                \"kaiwu275/16399\",\n",
       "                \"kaiwu274/16448\",\n",
       "                \"kaiwu277/16497\",\n",
       "                \"kaiwu276/16547\",\n",
       "                \"kaiwu278/16645\",\n",
       "                \"kaiwu280/16791\",\n",
       "                \"kaiwu284/16840\",\n",
       "                \"kaiwu283/16889\",\n",
       "                \"kaiwu287/16939\",\n",
       "                \"kaiwu286/16988\",\n",
       "                \"kaiwu285/17037\",\n",
       "                \"kaiwu295/17527\",\n",
       "                \"kaiwu327/17527\",\n",
       "                \"kaiwu329/17570\",\n",
       "                \"kaiwu328/17619\",\n",
       "                \"kaiwu332/17668\",\n",
       "                \"kaiwu331/17718\",\n",
       "                \"kaiwu330/17769\",\n",
       "                \"kaiwu334/17821\",\n",
       "                \"kaiwu333/17870\",\n",
       "                \"kaiwu301/17873\",\n",
       "                \"kaiwu336/17923\",\n",
       "                \"kaiwu335/17973\",\n",
       "                \"kaiwu339/18024\",\n",
       "                \"kaiwu338/18073\",\n",
       "                \"kaiwu337/18128\",\n",
       "                \"kaiwu341/18177\",\n",
       "                \"kaiwu340/18228\",\n",
       "                \"kaiwu343/18279\",\n",
       "                \"kaiwu342/18329\",\n",
       "                \"kaiwu346/18377\",\n",
       "                \"kaiwu345/18426\",\n",
       "                \"kaiwu344/18475\",\n",
       "                \"kaiwu316/18507\",\n",
       "                \"kaiwu315/18555\",\n",
       "                \"kaiwu323/18847\",\n",
       "                \"kaiwu322/18897\",\n",
       "                \"kaiwu326/18945\",\n",
       "                \"kaiwu325/18994\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"\\u6a21\\u578b\\u7efc\\u5408\\u56fe\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"horizontal\",\n",
       "        \"itemSize\": 15,\n",
       "        \"itemGap\": 10,\n",
       "        \"left\": \"80%\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"type\": \"png\",\n",
       "                \"backgroundColor\": \"auto\",\n",
       "                \"connectedBackgroundColor\": \"#fff\",\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4fdd\\u5b58\\u4e3a\\u56fe\\u7247\",\n",
       "                \"pixelRatio\": 1\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u8fd8\\u539f\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                \"readOnly\": false,\n",
       "                \"lang\": [\n",
       "                    \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                    \"\\u5173\\u95ed\",\n",
       "                    \"\\u5237\\u65b0\"\n",
       "                ],\n",
       "                \"backgroundColor\": \"#fff\",\n",
       "                \"textareaColor\": \"#fff\",\n",
       "                \"textareaBorderColor\": \"#333\",\n",
       "                \"textColor\": \"#000\",\n",
       "                \"buttonColor\": \"#c23531\",\n",
       "                \"buttonTextColor\": \"#fff\"\n",
       "            },\n",
       "            \"dataZoom\": {\n",
       "                \"show\": true,\n",
       "                \"title\": {\n",
       "                    \"zoom\": \"\\u533a\\u57df\\u7f29\\u653e\",\n",
       "                    \"back\": \"\\u533a\\u57df\\u7f29\\u653e\\u8fd8\\u539f\"\n",
       "                },\n",
       "                \"icon\": {},\n",
       "                \"filterMode\": \"filter\"\n",
       "            },\n",
       "            \"magicType\": {\n",
       "                \"show\": true,\n",
       "                \"type\": [\n",
       "                    \"line\",\n",
       "                    \"bar\",\n",
       "                    \"stack\",\n",
       "                    \"tiled\"\n",
       "                ],\n",
       "                \"title\": {\n",
       "                    \"line\": \"\\u5207\\u6362\\u4e3a\\u6298\\u7ebf\\u56fe\",\n",
       "                    \"bar\": \"\\u5207\\u6362\\u4e3a\\u67f1\\u72b6\\u56fe\",\n",
       "                    \"stack\": \"\\u5207\\u6362\\u4e3a\\u5806\\u53e0\",\n",
       "                    \"tiled\": \"\\u5207\\u6362\\u4e3a\\u5e73\\u94fa\"\n",
       "                },\n",
       "                \"icon\": {}\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "                chart_03b171ad28de40f08081d82237e08b44.setOption(option_03b171ad28de40f08081d82237e08b44);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x264ff5b6830>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def get_graph(df):\n",
    "    import pyecharts.options as opts\n",
    "    from pyecharts.charts import Line\n",
    "    from pyecharts.globals import ThemeType\n",
    "\n",
    "    # 对数据按照 model_steps 排序\n",
    "    df_sorted = df.sort_values(by='model_steps')\n",
    "\n",
    "    model_name_list = df_sorted['model_name'].tolist()\n",
    "    steps = df_sorted['model_steps'].tolist()\n",
    "    x_data = [f\"{name}/{step}\" for name, step in zip(model_name_list, steps)]\n",
    "    y_data1 = df_sorted['win_rate'].round(2).tolist()\n",
    "    y_data2 = df_sorted['eval_A_kda'].tolist()\n",
    "    y_data3 = [round(x / 10000, 4) for x in df_sorted['eval_A_money']]\n",
    "    y_data4 = [round(x / 10000, 4) for x in df_sorted['eval_A_exp']]\n",
    "\n",
    "\n",
    "    c =  (\n",
    "        Line(init_opts=opts.InitOpts(theme=ThemeType.DARK, width=\"1200px\", height=\"800px\"))\n",
    "        .add_xaxis(xaxis_data=x_data)\n",
    "        .add_yaxis(\n",
    "            series_name=\"模型胜率\",\n",
    "            y_axis=y_data1,\n",
    "            markpoint_opts=opts.MarkPointOpts(\n",
    "                data=[\n",
    "                    opts.MarkPointItem(type_=\"max\", name=\"最大值\"),\n",
    "                    opts.MarkPointItem(type_=\"min\", name=\"最小值\"),\n",
    "                ]\n",
    "            ),\n",
    "            markline_opts=opts.MarkLineOpts(\n",
    "                data=[opts.MarkLineItem(type_=\"average\", name=\"平均值\")]\n",
    "            ),\n",
    "        )\n",
    "        .add_yaxis(\n",
    "            series_name=\"模型KDA\",\n",
    "            y_axis=y_data2,\n",
    "            markpoint_opts=opts.MarkPointOpts(\n",
    "                data=[\n",
    "                    opts.MarkPointItem(type_=\"max\", name=\"最大值\"),\n",
    "                    opts.MarkPointItem(type_=\"min\", name=\"最小值\"),\n",
    "                ]\n",
    "            ),\n",
    "            markline_opts=opts.MarkLineOpts(\n",
    "                data=[opts.MarkLineItem(type_=\"average\", name=\"平均值\")]\n",
    "            ),\n",
    "        )\n",
    "        .add_yaxis(\n",
    "            series_name=\"模型经济\",\n",
    "            y_axis=y_data3,\n",
    "            markpoint_opts=opts.MarkPointOpts(\n",
    "                data=[\n",
    "                    opts.MarkPointItem(type_=\"max\", name=\"最大值\"),\n",
    "                    opts.MarkPointItem(type_=\"min\", name=\"最小值\"),\n",
    "                ]\n",
    "            ),\n",
    "            markline_opts=opts.MarkLineOpts(\n",
    "                data=[opts.MarkLineItem(type_=\"average\", name=\"平均值\")]\n",
    "            ),\n",
    "        )\n",
    "        .add_yaxis(\n",
    "            series_name=\"模型经验\",\n",
    "            y_axis=y_data4,\n",
    "            markpoint_opts=opts.MarkPointOpts(\n",
    "                data=[\n",
    "                    opts.MarkPointItem(type_=\"max\", name=\"最大值\"),\n",
    "                    opts.MarkPointItem(type_=\"min\", name=\"最小值\"),\n",
    "                ]\n",
    "            ),\n",
    "            markline_opts=opts.MarkLineOpts(\n",
    "                data=[opts.MarkLineItem(type_=\"average\", name=\"平均值\")]\n",
    "            ),\n",
    "        )\n",
    "        .set_global_opts(\n",
    "            title_opts=opts.TitleOpts(title=\"模型综合图\"),\n",
    "            tooltip_opts=opts.TooltipOpts(trigger=\"axis\"),\n",
    "            toolbox_opts=opts.ToolboxOpts(is_show=True),\n",
    "            xaxis_opts=opts.AxisOpts(\n",
    "                type_=\"category\", \n",
    "                boundary_gap=False,\n",
    "                axislabel_opts=opts.LabelOpts(rotate=0)\n",
    "                ),\n",
    "        )\n",
    "        .render_notebook()\n",
    "    )\n",
    "    return c\n",
    "   \n",
    "def get_output_data(enemy_model=\"baseline-4\"):\n",
    "    eval_df = pd.read_csv('data\\\\eval_info.csv')\n",
    "    upload_model_info = pd.read_csv('data\\\\upload_model_info.csv')\n",
    "    uploaded_model_info = pd.read_csv('data\\\\uploaded_model.csv')\n",
    "    output_info = get_output_info(eval_df, upload_model_info, uploaded_model_info, enemy_model)\n",
    "    return output_info\n",
    "\n",
    "output_data = get_output_data()\n",
    "get_graph(output_data)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "crawler",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
